package com.xzakota.minesweeper.msg;

/**
 * 游戏获胜消息
 *
 * @author Xzakota
 */
public class GameWinMsg extends RoomMsg {
    public int getTime() {
        int time = 0;
        Object[] msg = (Object[]) this.data;
        if (msg[1] instanceof Integer) {
            time = (int) msg[2];
        }
        return time;
    }

    @Override
    public String getTag() {
        return "游戏获胜消息";
    }

    @Override
    public String toString() {
        return getTag() + ": " + getUser().username + " 在房间 " + getRoomNum() + "中赢了一局游戏";
    }
}
